package com.java2405.first.luoyang_management.jwt.config;

import com.java2405.first.luoyang_management.intercepter.JwtInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class JwtConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new JwtInterceptor())
        //添加拦截路径
        .addPathPatterns("/com.java2405.first.luoyang_management/**")
        //添加放⾏路径
        .excludePathPatterns("/manager/login","/fp/login");

    }
}

